<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>详情页</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/proList.css"/>
</head>
<body><!------------------------------head------------------------------>

<%@include file="header.jsp" %>
</div><!-----------------address------------------------------->
<div class="address">
    <div class="wrapper clearfix">
        <a href="indexselect">首页</a><span>/</span>
        <a href="selectproductlist?cid=${cate.CATE_ID }">${cate.CATE_NAME }</a><span>/</span>
        <a href="#" class="on">${p.PRODUCT_NAME }</a>
    </div>
</div><!-----------------------Detail------------------------------>
<div class="detCon">
    <div class="proDet wrapper">
        <div class="proCon clearfix">
            <div class="proImg fl">
                <img class="det" src="images/${p.PRODUCT_FILENAME }"/>

            </div>
            <div class="fr intro">
                <div class="title"><h4>${p.PRODUCT_NAME }</h4>
                    <p>【${p.PRODUCT_DESCRIPTION }】</p><span>￥${p.PRODUCT_PRICE }.00</span></div>
                <div class="proIntro"><p>颜色分类</p>
                    <div class="smallImg clearfix categ"><p class="fl"><img src="images/${p.PRODUCT_FILENAME } "
                                                                            data-src="images/${p.PRODUCT_FILENAME }">
                    </p>
                    </div>
                    <p>数量&nbsp;&nbsp;库存<span>${p.PRODUCT_STOCK }</span>件</p>
                    <div class="num clearfix"><img class="fl sub" src="img/temp/sub.jpg">
                        <span id="count" class="fl" contentEditable="true">1</span><img
                                class="fl add" src="img/temp/add.jpg">
                        <p class="please fl">请选择商品属性!</p>
                    </div>

                </div>


                <div class="btns clearfix">
<%--                    <a href="javascript:shopAdd(${p.PRODUCT_ID },'z')"><p class="buy fl">立即购买</p></a>--%>
<%--                    <a href="javascript:shopAdd(${p.PRODUCT_ID },'s')"><p class="cart fr"> 加入购物车</p></a>--%>
    <a href="javascript:void(0);" onclick="shopAdd(${p.PRODUCT_ID}, 'z')"><p class="buy fl">立即购买</p></a>
    <a href="javascript:void(0);" onclick="shopAdd(${p.PRODUCT_ID}, 's')"><p class="cart fr">加入购物车</p></a>

                </div>
            </div>
        </div>
    </div>
</div>

<script>
    function shopAdd(id, url) {
        var count = document.getElementById("count").innerHTML;

        location.href = 'cartadd?id=' + id + '&count=' + count + '&url=' + url;

    }

</script>



<div class="msk"></div>
<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.SuperSlide.2.1.1.js" type="text/javascript" charset="utf-8"></script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="js/nav.js" type="text/javascript" charset="utf-8"></script>
<script src="js/pro.js" type="text/javascript" charset="utf-8"></script>
<script src="js/cart.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">jQuery(".bottom").slide({
    titCell: ".hd ul",
    mainCell: ".bd .likeList",
    autoPage: true,
    autoPlay: false,
    effect: "leftLoop",
    autoPlay: true,
    vis: 1
});</script>
</body>
</html>